
function tick() {
  var hours, minutes, seconds, ap;
  var intHours, intMinutes, intSeconds;
  var today;

  today = new Date();

  intHours = today.getHours();
  intMinutes = today.getMinutes();
  intSeconds = today.getSeconds();

  if (intHours == 0) {
     hours = "12:";
     ap = "\u5348\u591c";
  } else if (intHours < 12) { 
     hours = intHours+":";
     ap = "\u4e0a\u5348";
  } else if (intHours == 12) {
     hours = "12:";
     ap = "\u4e2d\u5348";
  } else {
     intHours = intHours - 12
     hours = intHours + ":";
     ap = "\u4e0b\u5348";
  }

  if (intMinutes < 10) {
     minutes = "0"+intMinutes+":";
  } else {
     minutes = intMinutes+":";
  }

  if (intSeconds < 10) {
     seconds = "0"+intSeconds+" ";
  } else {
     seconds = intSeconds+" ";
  } 
  

  timeString = ap+hours+minutes+seconds;

  Clock.innerHTML = '\u6b22\u8fce\u60a8\u767b\u9646!\u73b0\u5728\u65f6\u523b '+ timeString;

  window.setTimeout("tick();", 100);
}

window.onload = tick;